laravel wherin softdelete

31

laravel wherin softdelete -

ModelName::whereIn('id', [array of ids])
           ->update(['deleted_at' => now()]);

DB::table('table_name')->whereIn('id', [array of ids])
            ->update([
                'deleted_at' => now()
            ]);

softdeletes laravel -

class Clientes extends Model{    use SoftDeletes;    protected $dates = ['deleted_at'];}

Comments

Submit
0 Comments